﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.ObjectModel;

namespace Pixysoft.Framework.Logs
{
    public interface IRecorder
    {
        /// <summary>
        /// 创建一个文本
        /// </summary>
        /// <returns></returns>
        IDocument CreateDocument();

        /// <summary>
        /// 保存一个文本
        /// </summary>
        /// <param name="doc"></param>
        /// <returns></returns>
        bool Append(IDocument doc);

        /// <summary>
        /// 追加 并询问是否直接归档
        /// </summary>
        /// <param name="doc"></param>
        /// <returns></returns>
        bool Append(IDocument doc, bool directArchive);

        /// <summary>
        /// 插入
        /// </summary>
        /// <param name="doc"></param>
        /// <returns></returns>
        bool Insert(IDocument doc);

        /// <summary>
        /// 对单个record进行保存 返回id
        /// </summary>
        /// <param name="record"></param>
        /// <returns></returns>
        string Append(IRecord record);
    }
}
